home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr29
/
planet22.zip
/
INSTALL.CMD
next >
Wrap
OS/2 REXX Batch file
|
1995-02-10
|
4KB
|
142 lines
/*****************************/
/* REXX command-line install */
/*****************************/
/* Planets */
/*****************************/
'@echo off'
'cls'
SIGNAL ON FAILURE
SIGNAL ON ERROR
CALL RxFuncAdd "SysLoadFuncs","REXXUTIL","SysLoadFuncs"
CALL SysLoadFuncs
CurDir=DIRECTORY()
ViewPath=SysSearchPath('PATH','VIEW.EXE')
if ViewPath='' then
do
say ''
say 'Error! VIEW.EXE not found! INF Files will use C:\OS2\VIEW.EXE...'
ViewPath='C:\OS2\VIEW.EXE'
end
EPath=SysSearchPath('PATH','E.EXE')
if EPath='' then
do
say ''
say 'Error! E.EXE not found! Text Files will use C:\OS2\E.EXE...'
ViewPath='C:\OS2\E.EXE'
end
say ''
say '*********************************************'
say '* Welcome to the Planets Install *'
say '*********************************************'
say ''
say 'The install will create objects on your desktop using the'
say 'current directory. If this is not what you want, move the'
say 'program file(s) to their destination directory and re-run'
say 'the install program.'
say ''
call charout,'Press any key to start Install or Q to quit...'
parse upper value SysGetKey('NOECHO') with key
if key='Q' then
EXIT
say ''
classname='WPFolder'
title='Planets'
location='<WP_DESKTOP>'
setup='CCVIEW=NO;ICONFILE='||CurDir||'\PLNTFOLD.ICO;OBJECTID=<PLANETS_FOLDER>;'
option='R'
call BldObj
classname='WPProgram'
title='Planets'
location='<PLANETS_FOLDER>'
setup='EXENAME='||CurDir||'\PLANETS.EXE;STARTUPDIR='||CurDir||';OBJECTID=<PLANETS_PROG>;'
option='R'
call BldObj
classname='WPProgram'
title='Planets'||'0A'x||'Information'
location='<PLANETS_FOLDER>'
setup='EXENAME='||ViewPath||';ICONFILE='||CurDir||'\PLNTINF.ICO;PARAMETERS=PLANETS.INF;STARTUPDIR='||CurDir||';OBJECTID=<PLANETS_INFO>;'
option='R'
call BldObj
classname='WPProgram'
title='Order Form'
location='<PLANETS_FOLDER>'
setup='EXENAME='||EPath||';PARAMETERS='||CurDir||'\ORDER.FRM;STARTUPDIR='||CurDir||';OBJECTID=<PLANETS_ORDERFRM>;'
option='R'
call BldObj
say ''
call charout,'Would you like to place Planets in your start-up folder also (Y/N)? '
parse upper value SysGetKey('NOECHO') with key
if key ='Y' then
do
classname='WPProgram'
title='Planets'
location='<WP_START>'
setup='EXENAME='||CurDir||'\PLANETS.EXE;STARTUPDIR='||CurDir||';OBJECTID=<PLANETS_START>;'
option='R'
say ''
call BldObj
end
StartupDrive=SysSearchPath('PATH','CONFIG.SYS')
StartupDrive=FILESPEC("drive",StartupDrive)
if STREAM('VPREXX.DLL','C','QUERY EXISTS') \= '' then
do
say ''
say 'VPREXX.DLL must be present in a directory contained in the LIBPATH'
say 'variable in config.sys. I recommend '||StartupDrive||'\OS2\DLL'
call charout,'Would you like to copy VPREXX.DLL to '||StartupDrive||'\OS2\DLL (Y/N)?'
parse upper value SysGetKey('NOECHO') with key
if key ='Y' then
do
say ''
'COPY VPREXX.DLL '||StartupDrive||'\OS2\DLL > nul'
end
else
do
say ''
say 'Okay, then remember to place VPREXX.DLL in a directory contained in your LIBPATH!'
end
end
say ''
call charout,'Press any key to exit...'
key=SysGetKey('NOECHO')
EXIT
/* Build Object Procedure */
BldObj:
call charout ,'Building: 'title substr(classname,3,)
result = SysCreateObject(classname, title, location, setup, option)
If result=1 Then call charout ,' ...Created!'
else
call charout ,' ...Not created! Return code='result
say ' '
Return
/*****************************************************************************/
* Standard REXX program error handler
*****************************************************************************/
ERROR:
say ''
SAY 'An install error has occurred...'
EXIT
FAILURE:
say ''
SAY 'An install error has occurred...'
EXIT